package com.lmk.t02;

public class Car extends MotoVehicle {
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Car(String no, String brand, String type) {
        super(no, brand);
        this.type = type;
    }

    @Override
    public int CalcRent(int days) {
        int rent = 0;
        if ("宝马".equals(getBrand())) {
            rent=days*500;
        }else if ("别克".equals(getBrand())) {
            if ("商务车GL8".equals(type)) {
                rent=days*600;
            }else if ("林荫大道".equals(type)) {
                rent=days*300;
            }

        }
        return rent;
    }
    public void show(){
        System.out.println("车的型号是"+super.getBrand()+"车的型号是"+type);
    }
}
